import request from "@/utils/request";
const URL = ''

/***
 * 提交返离校申请
 * @returns {*}
 */
export function rlAdd(data){
    return request({
        method:'post',
        url: URL+'/rl',
        data
    })
}
/***
 * 老师获取全部返离校申请
 * @returns {*}
 */
export function getRLByTeacherId(){
    return request({
        method:'get',
        url: 'teacher/rl',
    })
}
/***
 * 老师获取全部返校申请
 * @returns {*}
 */
export function getRByTeacherId(){
    return request({
        method:'get',
        url: 'teacher/r',
    })
}
/***
 * 老师获取全部离校申请
 * @returns {*}
 */
export function getLByTeacherId(){
    return request({
        method:'get',
        url: 'teacher/l',
    })
}
/***
 * 学生获取全部返校申请
 * @returns {*}
 */
export function getRByStudentId(){
    return request({
        method:'get',
        url: 'student/r',
    })
}
/***
 * 学生获取全部离校申请
 * @returns {*}
 */
export function getLByStudentId(){
    return request({
        method:'get',
        url: 'student/l',
    })
}
/***
 * 学生获取全部返离校申请
 * @returns {*}
 */
export function getRLByStudentId(){
    return request({
        method:'get',
        url: 'student/rl',
    })
}

/***
 * 修改返离校申请
 * @param uid
 * @param data
 * @returns {*}
 */
export function rlChange(uid,data){
    return request({
        method:'put',
        url: URL+'/rl/'+uid,
        data
    })
}

export function del(uid){
    return request({
        method:'delete',
        url: URL+'/rl/'+uid,
    })
}